﻿using System.Collections;
using System.Collections.Generic;

public class EventEntry
{
    public string tag;
    public object target;
    public EventHandler handler;
    public bool isDirty;

    public EventEntry()
    {
        isDirty = false;
    }

    public void Init(string _tag, object _target, EventHandler _handler)
    {
        tag = _tag;
        target = _target;
        handler = _handler;
    }

    public void Destroy ()
    {
        this.handler = null;
        this.isDirty = false;
    }

    public void Execute(params object[] args)
    {
        handler (tag, args);
    }
}
